"use strict";
import * as React from 'react';
import { commonStyles } from "../assets/styles/common";
const { View, ActivityIndicator, Text } = require('react-native');
const LoadingView = (props) => {
    if (props.loading) {
        return (<View style={[commonStyles.centerVH, { flex: 1, backgroundColor: '#fff' }]}>
                <ActivityIndicator size='large' color="black"/>
                <Text style={{ marginTop: 20 }}>加载中...</Text>
            </View>);
    }
    else {
        return (<View style={[{ flex: 1 }, props.style]}>
                {props.children}
            </View>);
    }
};
export default LoadingView;
